package com.ddx.dao;

import com.ddx.pojo.ShoppingAccount;
import org.apache.ibatis.transaction.Transaction;
import org.springframework.stereotype.Repository;

@Repository
public interface ShoppingAccountMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ShoppingAccount record);

    int insertSelective(ShoppingAccount record);

    ShoppingAccount selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ShoppingAccount record);

    int updateByPrimaryKey(ShoppingAccount record);

    //@LZ_TAG_ID: METHOD BEGIN 自定义方法
    /**
     * 根据accountNo查询账户信息
     * @param accountNo
     * @return
     */
    ShoppingAccount selectAccountByAccountNo(String accountNo);
    /**
     * 根据userId查询账户信息
     * @param userId
     * @return
     */
    ShoppingAccount selectAccountByUserId(String userId);
    /**
     * 根据userId查询账户信息
     * @param userId
     * @return
     */
    ShoppingAccount selectAccountByUserIdForUpdate(String userId);
    /**
     * 根据accountNo修改账户
     * @param record
     * @return
     */
    int updateAccountByAccountNo(ShoppingAccount record);

    int updatInterestTotalByUserId(Transaction transaction);
    //@LZ_TAG_ID: METHOD END
}